<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{


 protected function _initAutoLoad()
    {
        $autoLoader = new Zend_Application_Module_Autoloader(array(
            'namespace' => '',
            'basePath'  => APPLICATION_PATH . '/modules' ));
//
        $fc = Zend_Controller_Front::getInstance();
//
        $fc->registerPlugin(new Application_Plugin_AccessCheck());
//
//        //$fc->registerPlugin();
        return $autoLoader;
    }

 protected function _initSesion()
    {
        $session= new Zend_Session_Namespace("GNS");
        Zend_Registry::set("login",$session);
        Zend_Registry::set("session",$session);

    }

    protected function _initViewHelpers()
    {
        $doctypeHelper = new Zend_View_Helper_Doctype();
        $doctypeHelper->doctype('XHTML1_STRICT');

        $this->bootstrap('layout');
        $layout = $this->getResource('layout');
        $view = $layout->getView();

        $view->headTitle('ZF')->headTitle('GNS')->setSeparator(' - ');

        $view->headLink()->prependStylesheet('/css/global.css');


    }








//private $_acl = null;

//     protected function _initAutoload()
//     {
//        //objeto para localozar el modulo e inicializarlo consulta obligada
//        //para q zend acl verifique los accesos
//        $modelLoader = new Zend_Application_Module_Autoloader(
//        array(  'namespace' => '',
//        'basePath' => APPLICATION_PATH.'/modules/default'));
//
//        // $this->_acl = new Model_LibraryAcl;
//        //$this->_auth = Zend_Auth::getInstance();
//
//
//        $fc = Zend_Controller_Front::getInstance();
//        $fc->registerPlugin(new Plugin_AccessCheck());
//
//        return $modelLoader;
//
//
//
//
//    }
//





}

